<?php
/**
 * @version        $Id: edit_baseinfo.php 1 8:38 2010年7月9日Z tianya $
 * @package        DedeCMS.Member
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once(dirname(__FILE__)."/config.php");
CheckRank(0,0);
$cha = $dsql->GetOne("SELECT renzheng FROM `#@__member` WHERE mid='".$cfg_ml->M_ID."'");
if($cha[renzheng]!='2'){
	 //ShowMsg('您还没有申请认证设计师或者还没有申请通过，暂时不能设置空间','renzheng.php');
	 include(DEDEMEMBER."/templets/renzhengcuowu.htm");
	 exit;
}else{

$spacename =(empty($spacename))? "" : $spacename;
$sign=(empty($sign))? "" : $sign;
if($dopost=='save')
{
    $spacename = cn_substrR(HtmlReplace($spacename, 2), 50);
    $sign = cn_substrR(HtmlReplace($sign), 100);
     $query = "UPDATE `#@__member_space` SET `spacename`='$spacename' , `sign` = '$sign' WHERE mid='{$cfg_ml->M_ID}' ";
    $dsql->ExecuteNoneQuery($query);
    $arr = array(
	       "zhi"=>"ok",
	        "msg"=>"空间设置成功"
        );
        echo json_encode($arr);
        exit;
}
$row = $dsql->GetOne("SELECT * FROM `#@__member_space` WHERE mid='".$cfg_ml->M_ID."'");
include(DEDEMEMBER."/templets/kongjian.htm");
}